package vinh.game;

import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

public class SpaceBlasterActivity extends Activity {
	private View view;
	
	@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        
        LayoutInflater factory = LayoutInflater.from(this);
        
        view = factory.inflate(R.layout.main, null);
        setContentView(view);
        
        view.setFocusable(true);
        view.setFocusableInTouchMode(true);
     
	}
	
	@Override
	protected void onStop(){
		super.onStop();
		((PersonalizedView) view).halt();
	}
	
	@Override
	protected void onPause(){
		super.onPause();
		onStop();
	}
	
	@Override
	protected void onRestart(){
		super.onRestart();
		((PersonalizedView) view).resume();
	}
}